/**
 * 
 */
package is.glif.fenius.translators.argia.utils.auth;

import java.net.InetSocketAddress;
import java.net.Proxy;

/**
 * Class to handle proxy related tasks
 * 
 * @author Scott Campbell
 * 
 */
public class ProxyUtil
{
	/**
	 * Create a proxy object
	 * 
	 * @return
	 */
	public static Proxy getProxy(String type, String host, int port)
	{
		return new Proxy(Proxy.Type.valueOf(type), new InetSocketAddress(host, port));
	}

	/**
	 * Create a Proxy object that repesents a direct connection to the internet..
	 * This method is the same as calling <code>Proxy.NO_PROXY</code>
	 * @return
	 */
	public static Proxy getDirectProxy()
	{
		return Proxy.NO_PROXY;
	}
}
